import request from '@/utils/request'
import {
    commercialApiUrl,
} from '../config'
// 分包施工图预算列表
export function getList(parameter) {
    return request({
        url: commercialApiUrl+'/drawing-budget/query-subcontract',
        method: 'post',
        data: parameter
    })
}

// 分包施工图预算列表统计
export function getListCount(parameter) {
    return request({
        url: commercialApiUrl+'/drawing-budget/query-subcontract/count',
        method: 'post',
        data: parameter
    })
}
// /drawing-budget/query-subcontract
// 分包施工图预算新增
export function addList(data) {
    return request({
        url:commercialApiUrl+ '/drawing-budget/subcontract',
        method: 'post',
        data
    })
}
// 分包施工图预算修改
export function editList(data) {
    return request({
        url:commercialApiUrl+ '/drawing-budget/subcontract/update',
        method: 'post',
        data
    })
}
// 分包施工图预算删除
export function cancel(data) {
    return request({
        url: commercialApiUrl+`/drawing-budget/subcontract/cancel`,
        method: 'post',
        data: data
    })
}
// 分包施工图预算查看
export function findList(data) {
    return request({
        url: commercialApiUrl+`/drawing-budget/subcontract`,
        method: 'get',
        params: data
    })
}
// 分包施工图预算查看
export function print(data) {
    return request({
        url: commercialApiUrl+`/drawing-budget/subcontract/print`,
        method: 'get',
        params: data
    })
}

// 分包施工图预算删除
export function deteleList(data) {
    return request({
        url: commercialApiUrl+`/drawing-budget/subcontract/del?id=${data.id}`,
        method: 'post',
    })
}

// 校验
export function addCheck(data) {
    return request({
        url: commercialApiUrl+`/drawing-budget/subcontract/check?contractId=${data}`,
        method: 'get',
    })
}